package com.kuangsheng.demo04switch选择结构;

public class Demo10 {
    public static void main(String[] args) {
        //case穿透  break后不穿透
        // swith匹配一个具体的值
        char grade = 'C';

        switch (grade){
            case 'A':
                System.out.println("优秀");
            case 'B':
                System.out.println("良好");
                break;
            case 'C':
                System.out.println("及格");
            case 'D':
                System.out.println("再接再厉");
            case 'E':
                System.out.println("挂科");
            default:
                System.out.println("未知等级");
        }

    }
}
